#!/usr/bin/env python
# vim:fileencoding=utf-8

from calibre.web.feeds.news import BasicNewsRecipe


class LigaNet(BasicNewsRecipe):
    title = '\u041B\u0406\u0413\u0410.net'
    __author__ = 'bugmen00t'
    description = '\u0414\u0456\u043B\u043E\u0432\u0438\u0439 \u043D\u043E\u0432\u0438\u043D\u043D\u0438\u0439 \u043F\u043E\u0440\u0442\u0430\u043B'
    publisher = 'Ligamedia'
    category = 'blog'
    cover_url = u'https://www.liga.net/design/images/logo_liga.png'
    language = 'ru_UK'
    no_stylesheets = False
    remove_javascript = False
    auto_cleanup = False
    oldest_article = 7
    max_articles_per_feed = 30

    remove_tags_before = dict(name='h1')

    remove_tags_after = dict(name='div', attrs={'id': 'news-text'})

    remove_tags = [
        dict(name='footer'),
        dict(name='div', attrs={'class': 'more-link red'}),
        dict(name='div', attrs={'class': 'read-too'}),
        dict(name='div', attrs={'class': 'to-send-row'}),
        dict(name='div', attrs={'class': 'hint-row'}),
        dict(name='div', attrs={'class': 'chronicle-top-eye'}),
        dict(name='div', attrs={'class': 'chronicle-top-comm comm-btns'}),
        dict(name='div', attrs={'class': 'chronicle-news m-t-30'}),
        dict(name='div', attrs={'class': 'right-inner-content'}),
        dict(name='div', attrs={'class': 'right-part'}),
        dict(name='div', attrs={'class': 'article-footer article-content__footer'}),
        dict(name='div', attrs={'class': 'tags article__tags'}),
        dict(name='div', attrs={'class': 'article-sidebar article-grid__sidebar'}),
        dict(name='div', attrs={'class': 'hreflang-link'}),
        dict(name='div', attrs={'class': 'vakansii-block-article'}),
        dict(
            name='div', attrs={'class': 'col-12 col-md p-side-10 sp-card-paddings'}
        ),
        dict(
            name='div',
            attrs={'class': 'social-shares d-flex justify-content-center'}
        ),
        dict(name='div', attrs={'class': 'social-shares d-block'}),
        dict(name='div', attrs={'class': 'social-likes clearfix hidden-1280 '}),
        dict(name='div', attrs={'class': 'soc-item comm-btns'}),
        dict(name='div', attrs={'class': 'soc-buttons'}),
        dict(
            name='div',
            attrs={'class': 'warning m-t-20 d-none d-md-none d-lg-block'}
        ),
        dict(name='div', attrs={'id': 'news-list-right'}),
        dict(name='div', attrs={'id': 'premium_mobile'}),
        dict(name='div', attrs={'id': 'premium2_mobile'}),
        dict(name='div', attrs={'class': 'marketing-block'}),
        dict(name='span', attrs={'class': 'social-likes__button'}),
        dict(name='div', attrs={'class': 'marketing-block'})
    ]

    feeds = [
        (
            '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u0433\u043B\u0430\u0432\u043D\u044B\u0435 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044B',
            'https://www.liga.net/news/top/rss.xml'
        ),
        (
            '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u043D\u043E\u0432\u043E\u0441\u0442\u0438',
            'https://www.liga.net/news/rss.xml'
        ),
        (
            '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u0441\u0442\u0430\u0442\u044C\u0438',
            'https://www.liga.net/news/articles/rss.xml'
        ),
        (
            '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u0438\u043D\u0442\u0435\u0440\u0432\u044C\u044E',
            'https://www.liga.net/news/interview/rss.xml'
        ),
        (
            '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u043C\u043D\u0435\u043D\u0438\u044F',
            'https://www.liga.net/news/opinion/rss.xml'
        ),
        (
            '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u0444\u043E\u0442\u043E\u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044B',
            'https://www.liga.net/news/photo/rss.xml'
        ),
        (
            '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u043F\u043E\u043B\u0438\u0442\u0438\u043A\u0430',
            'https://www.liga.net/news/politics/rss.xml'
        ),
        (
            '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u044D\u043A\u043E\u043D\u043E\u043C\u0438\u043A\u0430',
            'https://www.liga.net/news/economics/rss.xml'
        ),
        (
            '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u043E\u0431\u0449\u0435\u0441\u0442\u0432\u043E',
            'https://www.liga.net/news/society/rss.xml'
        ),
        (
            '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u043C\u0438\u0440',
            'https://www.liga.net/news/world/rss.xml'
        ),
        (
            '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u0441\u0442\u043E\u043B\u0438\u0446\u0430',
            'https://www.liga.net/news/capital/rss.xml'
        ),
        (
            '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u0441\u043F\u043E\u0440\u0442',
            'https://www.liga.net/news/sport/rss.xml'
        ),
        (
            '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u0437\u0434\u043E\u0440\u043E\u0432\u044C\u0435',
            'https://www.liga.net/news/health/rss.xml'
        ),
        (
            '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u043A\u0443\u043B\u044C\u0442\u0443\u0440\u0430',
            'https://www.liga.net/news/culture/rss.xml'
        ),
        (
            '\u0412\u0441\u0435 \u043C\u043D\u0435\u043D\u0438\u044F',
            'https://www.liga.net/opinion/rss.xml'
        ),
        (
            '\u0411\u0438\u0437\u043D\u0435\u0441: \u0433\u043B\u0430\u0432\u043D\u044B\u0435 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044B',
            'https://www.liga.net/biz/top/rss.xml'
        ),
        (
            '\u0411\u0438\u0437\u043D\u0435\u0441: \u043D\u043E\u0432\u043E\u0441\u0442\u0438',
            'https://www.liga.net/biz/news/rss.xml'
        ),
        (
            '\u0411\u0438\u0437\u043D\u0435\u0441: \u0441\u0442\u0430\u0442\u044C\u0438',
            'https://www.liga.net/biz/articles/rss.xml'
        ),
        (
            '\u0411\u0438\u0437\u043D\u0435\u0441: \u0438\u043D\u0442\u0435\u0440\u0432\u044C\u044E',
            'https://www.liga.net/biz/interview/rss.xml'
        ),
        (
            '\u0411\u0438\u0437\u043D\u0435\u0441: \u043C\u043D\u0435\u043D\u0438\u044F',
            'https://www.liga.net/biz/opinion/rss.xml'
        ),
        (
            '\u0411\u0438\u0437\u043D\u0435\u0441: \u0444\u043E\u0442\u043E\u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044B',
            'https://www.liga.net/biz/photo/rss.xml'
        ),
        (
            '\u0424\u0438\u043D\u0430\u043D\u0441\u044B: \u0433\u043B\u0430\u0432\u043D\u044B\u0435 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044B',
            'https://www.liga.net/fin/export/top.xml'
        ),
        (
            '\u0424\u0438\u043D\u0430\u043D\u0441\u044B: \u043C\u043D\u0435\u043D\u0438\u044F',
            'https://www.liga.net/fin/opinion/rss.xml'
        ),
        (
            '\u0424\u0438\u043D\u0430\u043D\u0441\u044B: \u0431\u0430\u043D\u043A\u0438',
            'https://www.liga.net/fin/export/bank.xml'
        ),
        (
            '\u0424\u0438\u043D\u0430\u043D\u0441\u044B: \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435',
            'https://www.liga.net/fin/export/insurance.xml'
        ),
        (
            '\u0424\u0438\u043D\u0430\u043D\u0441\u044B: \u043A\u0440\u0438\u043F\u0442\u043E\u044D\u043A\u043E\u043D\u043E\u043C\u0438\u043A\u0430',
            'https://www.liga.net/fin/crypto/rss.xml'
        ),
        (
            '\u0424\u0438\u043D\u0430\u043D\u0441\u044B: \u0444\u043E\u043D\u0434\u044B',
            'https://www.liga.net/fin/export/funds.xml'
        ),
        (
            'Tech: \u0433\u043B\u0430\u0432\u043D\u044B\u0435 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044B',
            'https://www.liga.net/tech/top/rss.xml'
        ),
        (
            'Tech: \u0442\u0435\u0445\u043D\u043E\u043B\u043E\u0433\u0438\u0438',
            'https://www.liga.net/tech/technology/rss.xml'
        ),
        (
            'Tech: \u0442\u0435\u043B\u0435\u043A\u043E\u043C',
            'https://www.liga.net/tech/telecom/rss.xml'
        ),
        (
            'Tech: \u0433\u0430\u0434\u0436\u0435\u0442\u044B',
            'https://www.liga.net/tech/gadgets/rss.xml'
        ),
        (
            'Tech: \u0441\u0432\u043E\u0439 \u0431\u0438\u0437\u043D\u0435\u0441',
            'https://www.liga.net/tech/own-business/rss.xml'
        ),
        (
            'Tech: \u0431\u0430\u0442\u0442\u043B\u044B',
            'https://www.liga.net/tech/battles/rss.xml'
        ),
        (
            '\u0411\u043B\u043E\u0433\u0438: \u0432\u0441\u0435 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044B',
            'https://www.liga.net/rss/blog.xml'
        )
    ]
